<?php
//框架的log
class Logger {
  public $log_file;
  public function __construct() { 
    $this->log_file = ROOT_PATH."/temp/log-".date("Ymd").".txt";
  }

  public function log($msg) {
    @file_put_contents($this->log_file, date("Y-m-d H:i:s")."\r\n", FILE_APPEND|LOCK_EX);
    @file_put_contents($this->log_file, serialize($msg)."\r\n\r\n", FILE_APPEND|LOCK_EX);
  }
}
